package cn.springcloud.provider.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

@Controller
public class TestSessionController {

    @RequestMapping("testSession")
    @ResponseBody
    public String testSession(HttpServletRequest request){

        return "session: "+request.getSession().getId()+ " port: "+request.getServerPort();

    }





}
